Remove unused batched-LDE wrapper functions#743
Merged
Conversation
ColoCarletti
approved these changes
Jun 29, 2026
coset_lde_batch_base_into_with_merkle_tree, coset_lde_batch_ext3_into_with_merkle_tree, and coset_lde_batch_ext3_into_with_leaf_hash have no callers anywhere (only their own definitions + assert-message strings) — thin pub wrappers over the *_inner helpers. Rebased onto main after #735 removed the coset_lde_batch_*_into_with_merkle_tree_keep variants. With those gone, the private coset_lde_batch_ext3_into_with_merkle_tree_inner was reachable only through the two dead ext3 wrappers, so it (and its now-unused launch_keccak_ext3 / launch_keccak_ext3_row_pair imports) is removed here as well. The base *_inner helper stays live via coset_lde_batch_base_into_with_leaf_hash. Pure deletion. math-cuda needs the CUDA toolchain (no nvcc on the dev box) — confirm with a CUDA build before merge.
b24c0bb to
5466f75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes dead, uncalled code from
crypto/math-cuda/src/lde.rs— −256 lines, +1 (the +1 is a one-line import collapse).What's removed
Three
pub fnwrappers with no callers anywhere on currentmain(verified across the whole repo — the only references are their own definitions andassert_u32_domainmessage strings):coset_lde_batch_base_into_with_merkle_treecoset_lde_batch_ext3_into_with_merkle_treecoset_lde_batch_ext3_into_with_leaf_hashThey are thin non-
_keepwrappers that delegate to the*_innerfunctions.Interaction with #735 (why the ext3
_innergoes too)This PR was rebased onto
mainafter #735 ("unify & clean up the commitment layer") removed thecoset_lde_batch_*_into_with_merkle_tree_keepvariants. Consequences:coset_lde_batch_base_into_with_merkle_tree_inner— stays live, still called bycoset_lde_batch_base_into_with_leaf_hash.coset_lde_batch_ext3_into_with_merkle_tree_inner— once refactor(stark): unify & clean up the commitment layer #735 deleted the ext3_keep, its only remaining callers were the two ext3 wrappers above. Removing them strands it as dead code, so this PR also removes:coset_lde_batch_ext3_into_with_merkle_tree_inner, andlaunch_keccak_ext3/launch_keccak_ext3_row_pair(collapsing thecrate::merkleimport to one line).Verification
main: zero call sites for the three wrappers; after removal, zero references tocoset_lde_batch_ext3_into_with_merkle_tree_innerand tolaunch_keccak_ext3*.coset_lde_batch_base_into_with_merkle_tree_inner,coset_lde_batch_base_into_with_leaf_hash,GpuLdeExt3, the row-major paths (coset_lde_*_row_major_with_merkle_tree_keep), and all keptcrate::merkleimports.rustfmtclean (the only stable-rustfmt diff is a pre-existing import-order quirk present onmain, untouched here).math-cudarequires the CUDA toolchain (nonvccon the dev box) and only builds under thecudafeature, which standard PR CI does not enable. A CUDA build should confirm it's warning-clean (nodead_code/unused-import) before merge.